<!DOCTYPE title PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

	<link rel="shortcut icon" href="images/backgrounds/MBC.jpg">
	<head><title></title></head>
	<style type="text/css">
  body{ margin:0;padding:0}
    a {text-decoration: none}
    .main{ margin-left:auto; margin-right:auto;height:50px; width:100%; 
    	background-color:rgb(0, 128, 255);
    	/*background:none repeat scroll 0% 0% rgb(51, 68, 84);*/
   		margin-bottom:10px; position: fixed;overflow:hidden; z-index:10;
    	box-shadow:1px 1px 2px rgb(0, 0, 0); -webkit-box-shadow: 1px 1px 1px rgb(0, 0, 0);
     }
    .main img{ width:50px; height:50px;}
    #printbox{ background-color:#989898; padding-top:60px;overflow: visible;z-index:1;}
    #printicon{ width:1024px; margin-left:auto; margin-right:auto; padding-top: 10px; }
    /*.btn{ border: none; color: red; cursor: pointer; font-weight: bold; height: 30px;-moz-border-radius:2px;}*/
    
    .btn_excel{ 
    
   /*  background:red url('../images/Excel.gif') no-repeat top left; */
    width:80px;
    height:35px;
    border: none;
    cursor: pointer;
    -moz-border-radius:2px;
    }
    
    .btn_pdf{ 
    
    /* background:red url('../images/pdf.gif') no-repeat top left; */
    width:80px;
    height:35px;
    border: none;
    cursor: pointer;
    -moz-border-radius:2px;
    }
    
    .btn_printing{ 
    
   /*  background:red url('../images/printing.gif') no-repeat top left; */
    width:80px;
    height:35px;
    border: none;
    cursor: pointer;
    -moz-border-radius:2px;
    }
    
    .btnbeauty {
    	border:1px solid rgb(48, 121, 237);
    	text-shadow:0pt 1px rgba(0, 0, 0, 0.1);
    	-webkit-text-shadow:0pt 1px rgba(0, 0, 0, 0.1);
    	background-image:-moz-linear-gradient(center top , rgb(77, 144, 254), rgb(71, 135, 237));
    }

  </style>
  <link rel="stylesheet" href="plugings/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" href="plugings/font-awesome-4.0.3/css/font-awesome.min.css" />
<link rel="stylesheet" href="plugings/perfect_scroll/perfect-scrollbar.min.css" />
<script type="text/javascript" language="javascript">
	
	function setTitle() {
		document.getElementsByTagName("title")[0].innerHTML = getParameterByName("title");
		/* title[0].innerHTML = '<%= session.getAttribute("reporttitle")%>'; */
		
		var frame1 = document.getElementById("frame1");
		frame1.src = "reportviewer2.jsp?title=" + getParameterByName("title") + '&id=' + getParameterByName('id');
		
		var marqueetitle = document.getElementById("marqueetitle");
		marqueetitle.innerHTML += "TDW SUPPLIER - " + getParameterByName("title");
	}
	
	function getParameterByName(name) {
	    name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
	    var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
	        results = regex.exec(location.search);
	    return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
	}
	
	function which(name) {
		if(name == "pdf")
			window.location = 'pdfprint.jsp?title=' + getParameterByName('title') + '&id=' + getParameterByName('id');
		else if(name == "excel")
			window.location = 'excelprint.jsp?title=' + getParameterByName('title') + '&id=' + getParameterByName('id');
		else if(name == "print")
			window.location = 'Printing.jsp?title=' + getParameterByName('title') + '&id=' + getParameterByName('id');
		else if(name == "home")
			window.location = 'reportviewer.jsp?title=' + getParameterByName('title') + '&id=' + getParameterByName('id');
	}
</script>
	<body onload="setTitle();">
	
		<div class="main">
			<div style="margin-left:20px;margin-top:5px">
				<button type="button" class="btnbeauty btn btn-warning" style="height:40px; width:100px;" onClick="JavaScript:which('pdf')" alt="PDF Print">
				<span class="glyphicon glyphicon-file"></span>
				PDF
				</button>
				<button type="button" class="btnbeauty btn btn-success" style="height:40px; width:100px" onClick="JavaScript:which('excel')">
				<span class="glyphicon glyphicon-floppy-open"></span>
				Excel
				</button>
				<button type="button" class="btnbeauty btn btn-danger" style="height:40px; width:100px" onClick="JavaScript:which('print')">
				<span class="glyphicon glyphicon-print"></span>
				Print
				</button>
				<button type="button" class="btnbeauty btn btn-info" style="height:40px; width:100px" onClick="JavaScript:which('home')">
				<span class="glyphicon glyphicon-home"></span>
				Home
				</button>
			</div> 
			<div style="margin-top:-30px;float: right">
				<marquee style="width:800px;color:yellow;text-shadow:2pt 2px rgba(0, 0, 0, 0.1);" scrollamount="5" id="marqueetitle"></marquee>
			</div>
		</div>
		<div>
			<iframe id="frame1" style="margin-top:50px;width: 100%; height: 100%; border-width: 0px"></iframe>
		</div>
	</body>
</html>